<div ng-controller="${tableName}MngCtrl">
    <section class="content-header">
        <h1>
            XXXXXX
            <small>Version 1.0</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="javascript:;"><i class="fa fa-dashboard"></i>XXXXXX</a></li>
            <li class="active">XXXXXX</li>
        </ol>
    </section>


    <section class="content">
        <div class="row">
            <div class="col-lg-12 col-sm-12">
                <div class="box">
                    <div class="box-body" style="padding-top: 30px; padding-left: 20px; padding-right: 20px;">
                        <div class="alert alert-danger alert-dismissable" ng-show="errorMessage">
                            <button type="button" class="close" ng-click="clearErrorMessage();">×</button>
                            <h4><i class="icon fa fa-ban"></i>{{errorMessage}}</h4>
                        </div>

                        <div class="alert alert-success alert-dismissable cssSlideUp" ng-show="successMessage">
                            <button type="button" class="close" ng-click="clearSuccessMessage();">
                                ×
                            </button>
                            <h4><i class="icon fa fa-ban"></i>{{successMessage}}</h4>
                        </div>

                        <div class="col-lg-12 col-sm-12" style="padding: 0;">
                            <div class="col-lg-2 col-sm-4" style="padding: 0;">
                                <button type="button" class="btn btn-block btn-primary"
                                        ui-sref="index.${tableName}Form">add
                                </button>
                            </div>
                        </div>

                        <div class="col-lg-12 col-sm-12"
                             style="margin-top: 25px; margin-bottom: 0; background: #fafafa;">
                            <div class="col-lg-1 col-sm-2">
                                <div style="float: left; padding:10px 10px 0 0;line-height: 34px;">name</div>
                                <div class="input-group margin" style="margin-bottom: 0; margin-right: 0;">
                                    <input type="checkbox" ng-model="search.name"
                                           style="margin-top: 10px; width: 16px;height: 16px;">
                                </div>
                            </div>
                            <div class="col-lg-1 col-sm-2">
                                <button style="margin-top: 10px" type="button" class="btn btn-block btn-primary margin"
                                        ng-click="getPagedDataAsync()">search
                                </button>
                            </div>
                        </div>

                        <table id="example2" class="table table-bordered table-hover"
                               style="float: left; margin-top: 20px;">
                            <thead>
                            <tr>
                            <#list fields as field>
                                <#if field.colName != "updateTime" && !field.autoIncrement>
                                    <th class="col-md-2 col-sm-1"
                                        style="text-align: center; vertical-align: middle;">${field.colName}</th>
                                </#if>
                            </#list>
                                <th class="col-md-2 col-sm-1" style="text-align: center; vertical-align: middle;">
                                    operation
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr class="odd gradeX" ng-repeat="item in list">
                            <#list fields as field>
                                <#if field.colName != "updateTime" && !field.autoIncrement>
                                    <td ng-bind="item.${field.colName}"
                                        style="text-align: center; vertical-align: middle;"></td>
                                </#if>
                            </#list>
                                <td style="text-align: center; vertical-align: middle;">
                                    <a class="btn btn-default ydc-btn-s"
                                       ui-sref="index.${tableName}Form({id:item.id})">编辑</a>
                                    <a class="btn bg-maroon ydc-btn-s" ng-click="delete(item.id)">删除</a>
                                </td>
                            </tr>
                            </tbody>
                        </table>


                        <uib-pagination boundary-links="true"
                                        max-size="5"
                                        items-per-page="search.pageSize"
                                        total-items="count"
                                        ng-model="pageIndex"
                                        ng-change="pagedCallback()"></uib-pagination>

                    </div>

                </div>
            </div>
        </div>
    </section>
</div>

